<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function export_datas() {
            let url = "/data/export_datas";
            let xhr = new XMLHttpRequest();
            xhr.open("POST", url, true);
            xhr.send();
            xhr.onreadystatechange = function () {
                if (xhr.readyState == 4 && xhr.status == 200) {
                    document.write(xhr.responseText)
                }
            }
        }

    </script>
</head>

<body>
    <button onclick="export_datas()">导出数据</button>
</body>

</html>